package com.muyu.danmo.mapper;


import com.muyu.common.core.domain.Result;
import com.muyu.danmo.domain.DanmoUserFollowers;
import com.muyu.danmo.domain.DanmoUserFollows;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 关注关系Mapper接口
 * 
 * @author yangle
 * @date 2024-11-15
 */
public interface DanmoUserFollowsMapper 
{
    /**
     * 查询关注关系
     * 
     * @param followId 关注关系主键
     * @return 关注关系
     */
    public DanmoUserFollows selectDanmoUserFollowsByFollowId(Long followId);

    /**
     * 查询关注关系列表
     * 
     * @param danmoUserFollows 关注关系
     * @return 关注关系集合
     */
    public List<DanmoUserFollows> selectDanmoUserFollowsList(DanmoUserFollows danmoUserFollows);

    /**
     * 新增关注关系
     * 
     * @param danmoUserFollows 关注关系
     * @return 结果
     */
    public Result insertDanmoUserFollows(DanmoUserFollows danmoUserFollows);

    /**
     * 修改关注关系
     * 
     * @param danmoUserFollows 关注关系
     * @return 结果
     */
    public Result updateDanmoUserFollows(DanmoUserFollows danmoUserFollows);

    /**
     * 删除关注关系
     * 
     * @param followId 关注关系主键
     * @return 结果
     */
    public Result deleteDanmoUserFollowsByFollowId(Long followId);

    /**
     * 批量删除关注关系
     * 
     * @param followIds 需要删除的数据主键集合
     * @return 结果
     */
    public Result deleteDanmoUserFollowsByFollowIds(Long[] followIds);

    void save(DanmoUserFollows danmoUserFollows);

    boolean existsByFollowerIdAndFolloweeId(@Param("followeeId") Long followeeId, @Param("followerId") Long followerId);

    void updateStatusForMutualFollow(@Param("followerId") Long followerId, @Param("followeeId") Long followeeId);

    DanmoUserFollows findById(DanmoUserFollows danmoUserFollows);

    void deleteById(Long followId);

    void updateStatusToFollow(@Param("followeeId") Long followeeId, @Param("followerId") Long followerId);

    void updateStatusToUnfollow(@Param("followerId") Long followerId, @Param("followeeId") Long followeeId);

    DanmoUserFollows selectDanmoUserFollowsByOtherParty(DanmoUserFollows danmoUserFollows);


        /**
     * 查询是否已添加过关注关系
     *
     * @param danmoUserFollows 关注关系
     * @return 结果
     */
    List<DanmoUserFollows> selectDanmoUserFollowsfanList(DanmoUserFollows danmoUserFollows);

    DanmoUserFollows selectDanmoUserFollowsByUserIdAndFollowId(@Param("followeeId") Long followeeId, @Param("followerId") Long followerId);

    DanmoUserFollowers selectFollowById(@Param("userid") Long userid, @Param("id") Long id);
}
